subroutine print_matrix(A, row, col)
  integer, parameter :: dbl = 8
  integer :: row, col
  real(dbl), intent(in) :: A(col, row)
  ! local 
  integer ::  k, j
  ! row = size(A,1)
  do k = 1, row
  do j = 1, col
     write(*,*) A(j,k)
  end do
  end do
  write(*,*)
end subroutine print_matrix
